﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;

namespace dst
{
    class Exp : IComparable<Exp>
    {
        public static Exp Zero = Ele.GetEle("", 0);
        public static Exp Unit = Ele.GetEle("", 1);

        protected BigInteger sig;
        protected Dictionary<string, BigInteger> subSigns = new Dictionary<string, BigInteger>();

        public BigInteger Sign
        {
            get { return sig; }
        }

        public Dictionary<string, BigInteger> SubSigns
        {
            get
            {
                if (subSigns.Count == 0)
                    MakeSubSign();
                
                return subSigns;
            }
        }

        protected virtual Exp Mul(Exp a)
        {
            throw new NotImplementedException();
        }

        protected virtual Exp Add(Exp a)
        {
            throw new NotImplementedException();
        }

        public static Exp operator *(Exp a, Exp b)
        {
            Exp r = a.Mul(b);
            return r;
        }

        public static Exp operator +(Exp a, Exp b)
        {
            Exp r = a.Add(b);
            return r;
        }

        public virtual int CompareTo(Exp other)
        {
            throw new NotImplementedException();
        }

        public virtual void SortSubs()
        {
        }

        public virtual Exp Factor(params Ele[] es)
        {
            throw new NotImplementedException();
        }

        public virtual bool Contains(Exp e)
        {
            throw new NotImplementedException();
        }

        public virtual void MakeSubSign()
        {
            throw new NotImplementedException();
        }

        public virtual HashSet<Exp> GenClosure()
        {
            throw new NotImplementedException();
        }

        public virtual List<Exp> GenClosure(int i)
        {
            throw new NotImplementedException();
        }

        public virtual Exp Replace(Exp old, Exp now)
        {
            throw new NotImplementedException();
        }
    }
}
